<html>
<head><meta charset="utf-8"><title>Why is this generator one byte bigger than expected? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html">Why is this generator one byte bigger than expected?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197066422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197066422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197066422">(May 10 2020 at 17:10)</a>:</h4>
<p>I expect the generator returned from <code>overlap_x_and_y</code> to be 1025 bytes. (1024 bytes for <code>Foo</code> + 1 byte for the discriminant) When compiling using cg_clif this is indeed true. However when compiling using cg_llvm it gives 1026 bytes. This mismatch causes the <code>size-moved-locals.rs</code> test to fail for cg_clif.</p>
<div class="codehilite"><pre><span></span><code><span class="c1">// based on size-moved-locals.rs</span>
<span class="cp">#![feature(generators, generator_trait)]</span><span class="w"></span>

<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">ops</span>::<span class="n">Generator</span><span class="p">;</span><span class="w"></span>

<span class="k">const</span><span class="w"> </span><span class="n">FOO_SIZE</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="mi">1024</span><span class="p">;</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Foo</span><span class="p">([</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="n">FOO_SIZE</span><span class="p">]);</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="nb">Drop</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">drop</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">overlap_x_and_y</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">impl</span><span class="w"> </span><span class="n">Generator</span><span class="o">&lt;</span><span class="n">Yield</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">Return</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">static</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">([</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">FOO_SIZE</span><span class="p">]);</span><span class="w"></span>
<span class="w">        </span><span class="kr">yield</span><span class="p">;</span><span class="w"></span>
<span class="w">        </span><span class="nb">drop</span><span class="p">(</span><span class="n">x</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">([</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">FOO_SIZE</span><span class="p">]);</span><span class="w"></span>
<span class="w">        </span><span class="kr">yield</span><span class="p">;</span><span class="w"></span>
<span class="w">        </span><span class="nb">drop</span><span class="p">(</span><span class="n">y</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">assert_eq</span><span class="o">!</span><span class="p">(</span><span class="mi">1026</span><span class="p">,</span><span class="w"> </span><span class="n">std</span>::<span class="n">mem</span>::<span class="n">size_of_val</span><span class="p">(</span><span class="o">&amp;</span><span class="n">overlap_x_and_y</span><span class="p">()));</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="197066848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197066848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197066848">(May 10 2020 at 17:19)</a>:</h4>
<p>The extra byte looks to be a drop flag</p>



<a name="197066937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197066937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197066937">(May 10 2020 at 17:20)</a>:</h4>
<p>I'm not sure why compiling for <code>cg_clif</code> would change this.</p>



<a name="197066959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197066959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197066959">(May 10 2020 at 17:21)</a>:</h4>
<p>Why do we still have drop flags anywhere?</p>



<a name="197067004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197067004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197067004">(May 10 2020 at 17:22)</a>:</h4>
<p>Oh, <em>across</em>  a yield</p>



<a name="197067025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197067025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197067025">(May 10 2020 at 17:22)</a>:</h4>
<p>But there are no dynamic drops in that generator</p>



<a name="197067048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197067048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197067048">(May 10 2020 at 17:23)</a>:</h4>
<p>Layout of the generator:</p>
<div class="codehilite"><pre><span></span><code>error: layout_of([static generator@src/main.rs:16:5: 23:6 {Foo, ()}]) = Layout {
    fields: Arbitrary {
        offsets: [
            Size {
                raw: 0,
            },
        ],
        memory_index: [
            0,
        ],
    },
    variants: Multiple {
        discr: Scalar {
            value: Int(
                I8,
                false,
            ),
            valid_range: 0..=4,
        },
        discr_kind: Tag,
        discr_index: 0,
        variants: [
            Layout {
                fields: Arbitrary {
                    offsets: [],
                    memory_index: [],
                },
                variants: Single {
                    index: 0,
                },
                abi: Aggregate {
                    sized: true,
                },
                largest_niche: None,
                align: AbiAndPrefAlign {
                    abi: Align {
                        pow2: 0,
                    },
                    pref: Align {
                        pow2: 3,
                    },
                },
                size: Size {
                    raw: 2,
                },
            },
            Layout {
                fields: Arbitrary {
                    offsets: [],
                    memory_index: [],
                },
                variants: Single {
                    index: 1,
                },
                abi: Aggregate {
                    sized: true,
                },
                largest_niche: None,
                align: AbiAndPrefAlign {
                    abi: Align {
                        pow2: 0,
                    },
                    pref: Align {
                        pow2: 3,
                    },
                },
                size: Size {
                    raw: 2,
                },
            },
            Layout {
                fields: Arbitrary {
                    offsets: [],
                    memory_index: [],
                },
                variants: Single {
                    index: 2,
                },
                abi: Aggregate {
                    sized: true,
                },
                largest_niche: None,
                align: AbiAndPrefAlign {
                    abi: Align {
                        pow2: 0,
                    },
                    pref: Align {
                        pow2: 3,
                    },
                },
                size: Size {
                    raw: 2,
                },
            },
            Layout {
                fields: Arbitrary {
                    offsets: [
                        Size {
                            raw: 2,
                        },
                        Size {
                            raw: 1,
                        },
                    ],
                    memory_index: [
                        1,
                        0,
                    ],
                },
                variants: Single {
                    index: 3,
                },
                abi: Aggregate {
                    sized: true,
                },
                largest_niche: None,
                align: AbiAndPrefAlign {
                    abi: Align {
                        pow2: 0,
                    },
                    pref: Align {
                        pow2: 3,
                    },
                },
                size: Size {
                    raw: 1026,
                },
            },
            Layout {
                fields: Arbitrary {
                    offsets: [
                        Size {
                            raw: 2,
                        },
                        Size {
                            raw: 1,
                        },
                    ],
                    memory_index: [
                        1,
                        0,
                    ],
                },
                variants: Single {
                    index: 4,
                },
                abi: Aggregate {
                    sized: true,
                },
                largest_niche: None,
                align: AbiAndPrefAlign {
                    abi: Align {
                        pow2: 0,
                    },
                    pref: Align {
                        pow2: 3,
                    },
                },
                size: Size {
                    raw: 1026,
                },
            },
        ],
    },
    abi: Aggregate {
        sized: true,
    },
    largest_niche: Some(
        Niche {
            offset: Size {
                raw: 0,
            },
            scalar: Scalar {
                value: Int(
                    I8,
                    false,
                ),
                valid_range: 0..=4,
            },
        },
    ),
    align: AbiAndPrefAlign {
        abi: Align {
            pow2: 0,
        },
        pref: Align {
            pow2: 3,
        },
    },
    size: Size {
        raw: 1026,
    },
}
</code></pre></div>



<a name="197067213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197067213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197067213">(May 10 2020 at 17:25)</a>:</h4>
<p>MIR of the generator:</p>
<div class="codehilite"><pre><span></span><code><span class="k">fn</span> <span class="nf">overlap_x_and_y</span>::<span class="p">{{</span><span class="n">closure</span><span class="p">}}</span><span class="err">#</span><span class="mi">0</span><span class="p">(</span><span class="n">_1</span>: <span class="nc">std</span>::<span class="n">pin</span>::<span class="n">Pin</span><span class="o">&lt;&amp;</span><span class="k">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">_2</span>: <span class="p">())</span><span class="w"> </span>-&gt; <span class="nc">std</span>::<span class="n">ops</span>::<span class="n">GeneratorState</span><span class="o">&lt;</span><span class="p">(),</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_0</span>: <span class="nc">std</span>::<span class="n">ops</span>::<span class="n">GeneratorState</span><span class="o">&lt;</span><span class="p">(),</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="p">;</span><span class="w"> </span><span class="c1">// return place in scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_3</span>: <span class="p">[</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="n">_</span><span class="p">];</span><span class="w">                 </span><span class="c1">// in scope 0 at src/main.rs:17:21: 17:34</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_4</span>: <span class="p">();</span><span class="w">                      </span><span class="c1">// in scope 0 at src/main.rs:18:9: 18:14</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">_5</span>: <span class="p">();</span><span class="w">                          </span><span class="c1">// in scope 0 at src/main.rs:19:9: 19:16</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_6</span>: <span class="nc">Foo</span><span class="p">;</span><span class="w">                     </span><span class="c1">// in scope 0 at src/main.rs:19:14: 19:15</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_7</span>: <span class="p">[</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="n">_</span><span class="p">];</span><span class="w">                 </span><span class="c1">// in scope 0 at src/main.rs:20:21: 20:34</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_8</span>: <span class="p">();</span><span class="w">                      </span><span class="c1">// in scope 0 at src/main.rs:21:9: 21:14</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">_9</span>: <span class="p">();</span><span class="w">                          </span><span class="c1">// in scope 0 at src/main.rs:22:9: 22:16</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_10</span>: <span class="nc">Foo</span><span class="p">;</span><span class="w">                    </span><span class="c1">// in scope 0 at src/main.rs:22:14: 22:15</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_11</span>: <span class="p">();</span><span class="w">                     </span><span class="c1">// in scope 0 at src/main.rs:16:15: 16:15</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_12</span>: <span class="kt">isize</span><span class="p">;</span><span class="w">                  </span><span class="c1">// in scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">    </span><span class="n">scope</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">debug</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">0</span>: <span class="nc">Foo</span><span class="p">);</span><span class="w"> </span><span class="c1">// in scope 1 at src/main.rs:17:13: 17:14</span>
<span class="w">        </span><span class="n">scope</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">debug</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">4</span><span class="p">).</span><span class="mi">0</span>: <span class="nc">Foo</span><span class="p">);</span><span class="w"> </span><span class="c1">// in scope 2 at src/main.rs:20:13: 20:14</span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb0</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">_12</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">discriminant</span><span class="p">((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}])));</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">        </span><span class="n">switchInt</span><span class="p">(</span><span class="k">move</span><span class="w"> </span><span class="n">_12</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="p">[</span><span class="mi">0</span><span class="k">u32</span>: <span class="nc">bb1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="k">u32</span>: <span class="nc">bb10</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="k">u32</span>: <span class="nc">bb9</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="k">u32</span>: <span class="nc">bb7</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="k">u32</span>: <span class="nc">bb8</span><span class="p">,</span><span class="w"> </span><span class="n">otherwise</span>: <span class="nc">bb11</span><span class="p">];</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb1</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">1</span>: <span class="kt">bool</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kc">false</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:17:13: 17:14</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_3</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 0 at src/main.rs:17:21: 17:34</span>
<span class="w">        </span><span class="n">_3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="k">const</span><span class="w"> </span><span class="mi">0</span><span class="k">u8</span><span class="p">;</span><span class="w"> </span><span class="n">FOO_SIZE</span><span class="p">];</span><span class="w">      </span><span class="c1">// scope 0 at src/main.rs:17:21: 17:34</span>
<span class="w">        </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">1</span>: <span class="kt">bool</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kc">true</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:17:17: 17:35</span>
<span class="w">        </span><span class="p">((((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">0</span>: <span class="nc">Foo</span><span class="p">).</span><span class="mi">0</span>: <span class="p">[</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="n">_</span><span class="p">])</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="n">_3</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:17:17: 17:35</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_3</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 0 at src/main.rs:17:34: 17:35</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_4</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:18:9: 18:14</span>
<span class="w">        </span><span class="p">((</span><span class="n">_0</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Yielded</span><span class="p">).</span><span class="mi">0</span>: <span class="p">())</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="n">_4</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 1 at src/main.rs:18:9: 18:14</span>
<span class="w">        </span><span class="n">discriminant</span><span class="p">(</span><span class="n">_0</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w">            </span><span class="c1">// scope 1 at src/main.rs:18:9: 18:14</span>
<span class="w">        </span><span class="n">discriminant</span><span class="p">((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}])))</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 1 at src/main.rs:18:9: 18:14</span>
<span class="w">        </span><span class="k">return</span><span class="p">;</span><span class="w">                          </span><span class="c1">// scope 1 at src/main.rs:18:9: 18:14</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb2</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_6</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:19:15: 19:16</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_5</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:19:16: 19:17</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_7</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:20:21: 20:34</span>
<span class="w">        </span><span class="n">_7</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="k">const</span><span class="w"> </span><span class="mi">0</span><span class="k">u8</span><span class="p">;</span><span class="w"> </span><span class="n">FOO_SIZE</span><span class="p">];</span><span class="w">      </span><span class="c1">// scope 1 at src/main.rs:20:21: 20:34</span>
<span class="w">        </span><span class="p">((((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">4</span><span class="p">).</span><span class="mi">0</span>: <span class="nc">Foo</span><span class="p">).</span><span class="mi">0</span>: <span class="p">[</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="n">_</span><span class="p">])</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="n">_7</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 1 at src/main.rs:20:17: 20:35</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_7</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:20:34: 20:35</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_8</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 2 at src/main.rs:21:9: 21:14</span>
<span class="w">        </span><span class="p">((</span><span class="n">_0</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Yielded</span><span class="p">).</span><span class="mi">0</span>: <span class="p">())</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="n">_8</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 2 at src/main.rs:21:9: 21:14</span>
<span class="w">        </span><span class="n">discriminant</span><span class="p">(</span><span class="n">_0</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w">            </span><span class="c1">// scope 2 at src/main.rs:21:9: 21:14</span>
<span class="w">        </span><span class="n">discriminant</span><span class="p">((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}])))</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 2 at src/main.rs:21:9: 21:14</span>
<span class="w">        </span><span class="k">return</span><span class="p">;</span><span class="w">                          </span><span class="c1">// scope 2 at src/main.rs:21:9: 21:14</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb3</span><span class="w"> </span><span class="p">(</span><span class="n">cleanup</span><span class="p">)</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">1</span>: <span class="kt">bool</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kc">false</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:23:5: 23:6</span>
<span class="w">        </span><span class="n">discriminant</span><span class="p">((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}])))</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">        </span><span class="n">resume</span><span class="p">;</span><span class="w">                          </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb4</span><span class="w"> </span><span class="p">(</span><span class="n">cleanup</span><span class="p">)</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_6</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:19:15: 19:16</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_5</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:19:16: 19:17</span>
<span class="w">        </span><span class="n">goto</span><span class="w"> </span>-&gt; <span class="nc">bb3</span><span class="p">;</span><span class="w">                     </span><span class="c1">// scope 1 at src/main.rs:1:1: 1:1</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb5</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_10</span><span class="p">);</span><span class="w">                </span><span class="c1">// scope 2 at src/main.rs:22:15: 22:16</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_9</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 2 at src/main.rs:22:16: 22:17</span>
<span class="w">        </span><span class="n">_11</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="p">();</span><span class="w">                  </span><span class="c1">// scope 0 at src/main.rs:16:15: 23:6</span>
<span class="w">        </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">1</span>: <span class="kt">bool</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kc">false</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:23:5: 23:6</span>
<span class="w">        </span><span class="p">((</span><span class="n">_0</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Complete</span><span class="p">).</span><span class="mi">0</span>: <span class="p">())</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="n">_11</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:23:6: 23:6</span>
<span class="w">        </span><span class="n">discriminant</span><span class="p">(</span><span class="n">_0</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w">            </span><span class="c1">// scope 0 at src/main.rs:23:6: 23:6</span>
<span class="w">        </span><span class="n">discriminant</span><span class="p">((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}])))</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:23:6: 23:6</span>
<span class="w">        </span><span class="k">return</span><span class="p">;</span><span class="w">                          </span><span class="c1">// scope 0 at src/main.rs:23:6: 23:6</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb6</span><span class="w"> </span><span class="p">(</span><span class="n">cleanup</span><span class="p">)</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_10</span><span class="p">);</span><span class="w">                </span><span class="c1">// scope 2 at src/main.rs:22:15: 22:16</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_9</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 2 at src/main.rs:22:16: 22:17</span>
<span class="w">        </span><span class="n">goto</span><span class="w"> </span>-&gt; <span class="nc">bb3</span><span class="p">;</span><span class="w">                     </span><span class="c1">// scope 1 at src/main.rs:1:1: 1:1</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb7</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_4</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_4</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:18:13: 18:14</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_5</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:19:9: 19:16</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_6</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 1 at src/main.rs:19:14: 19:15</span>
<span class="w">        </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">1</span>: <span class="kt">bool</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kc">false</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 1 at src/main.rs:19:14: 19:15</span>
<span class="w">        </span><span class="n">_6</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">3</span><span class="p">).</span><span class="mi">0</span>: <span class="nc">Foo</span><span class="p">);</span><span class="w"> </span><span class="c1">// scope 1 at src/main.rs:19:14: 19:15</span>
<span class="w">        </span><span class="n">_5</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span>::<span class="n">mem</span>::<span class="nb">drop</span>::<span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">(</span><span class="k">move</span><span class="w"> </span><span class="n">_6</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="p">[</span><span class="k">return</span>: <span class="nc">bb2</span><span class="p">,</span><span class="w"> </span><span class="n">unwind</span>: <span class="nc">bb4</span><span class="p">];</span><span class="w"> </span><span class="c1">// scope 1 at src/main.rs:19:9: 19:16</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb8</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_8</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">        </span><span class="n">StorageDead</span><span class="p">(</span><span class="n">_8</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 2 at src/main.rs:21:13: 21:14</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_9</span><span class="p">);</span><span class="w">                 </span><span class="c1">// scope 2 at src/main.rs:22:9: 22:16</span>
<span class="w">        </span><span class="n">StorageLive</span><span class="p">(</span><span class="n">_10</span><span class="p">);</span><span class="w">                </span><span class="c1">// scope 2 at src/main.rs:22:14: 22:15</span>
<span class="w">        </span><span class="n">_10</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="p">(((</span><span class="o">*</span><span class="p">(</span><span class="n">_1</span><span class="p">.</span><span class="mi">0</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="k">static</span><span class="w"> </span><span class="n">generator</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">5</span>: <span class="mi">23</span>:<span class="mi">6</span><span class="w"> </span><span class="p">{</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="p">()}]))</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">variant</span><span class="err">#</span><span class="mi">4</span><span class="p">).</span><span class="mi">0</span>: <span class="nc">Foo</span><span class="p">);</span><span class="w"> </span><span class="c1">// scope 2 at src/main.rs:22:14: 22:15</span>
<span class="w">        </span><span class="n">_9</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span>::<span class="n">mem</span>::<span class="nb">drop</span>::<span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">(</span><span class="k">move</span><span class="w"> </span><span class="n">_10</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="p">[</span><span class="k">return</span>: <span class="nc">bb5</span><span class="p">,</span><span class="w"> </span><span class="n">unwind</span>: <span class="nc">bb6</span><span class="p">];</span><span class="w"> </span><span class="c1">// scope 2 at src/main.rs:22:9: 22:16</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb9</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">assert</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;generator resumed after panicking&quot;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">bb9</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb10</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">assert</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;generator resumed after completion&quot;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">bb10</span><span class="p">;</span><span class="w"> </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="n">bb11</span>: <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">unreachable</span><span class="p">;</span><span class="w">                     </span><span class="c1">// scope 0 at src/main.rs:16:5: 23:6</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="197067261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197067261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197067261">(May 10 2020 at 17:26)</a>:</h4>
<p>I don't see any drop flags</p>



<a name="197067560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197067560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197067560">(May 10 2020 at 17:31)</a>:</h4>
<p><code>_1.0: &amp;mut [static generator@src/main.rs:16:5: 23:6 {Foo, ()}])) as variant#3).1</code> is the drop flag</p>



<a name="197067655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197067655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197067655">(May 10 2020 at 17:33)</a>:</h4>
<p>Ah</p>



<a name="197068183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Why%20is%20this%20generator%20one%20byte%20bigger%20than%20expected%3F/near/197068183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Why.20is.20this.20generator.20one.20byte.20bigger.20than.20expected.3F.html#197068183">(May 10 2020 at 17:40)</a>:</h4>
<p>Found the difference between cg_llvm and cg_clif! Because cg_clif doesn't yet support unwinding, I was passing <code>-Cpanic=abort</code> by default. Using <code>-Cpanic=unwind</code> fixed the size difference.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>